]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dialog: Use GObject.set() over Object.assign()
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 26 Jun 2019 17:16:41 +0000 (19:16 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 26 Jun 2019 18:49:46 +0000 (20:49 +0200)
gjs has provided that as a more idiomatic replacement for a while.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/600

js/ui/dialog.js

index 553b81c78696441595cdc96fb359111930a648ec..af057e631146e00ee320867ae9f3077a57fc059d 100644 (file)
@@ -214,7 +214,10 @@ var MessageDialogContent = GObject.registerClass({
     }
 
     set icon(icon) {
-        Object.assign(this._icon, { gicon: icon, visible: icon != null });
+        this._icon.set({
+            gicon: icon,
+            visible: icon != null
+        });
         this.notify('icon');
     }
 
@@ -231,7 +234,10 @@ var MessageDialogContent = GObject.registerClass({
     }
 
     _setLabel(label, prop, value) {
-        Object.assign(label, { text: value || '', visible: value != null });
+        label.set({
+            text: value || '',
+            visible: value != null
+        });
         this.notify(prop);
     }